-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wait for solution to be loaded before initializing remote telemetry #74944
Conversation
|
||
// Switch to a background thread to avoid loading option providers on UI thread (telemetry is reading options). | ||
await TaskScheduler.Default; | ||
|
||
var logDelta = _globalOptions.GetOption(DiagnosticOptionsStorage.LogTelemetryForBackgroundAnalyzerExecution); | ||
var telemetryService = (VisualStudioWorkspaceTelemetryService)Services.GetRequiredService<IWorkspaceTelemetryService>(); | ||
telemetryService.InitializeTelemetrySession(telemetrySession, logDelta); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was already running in the BG before. i'm just moving it earlier (where we're already on the BG) instead of having to jump back to bg to run this
src/VisualStudio/Core/Def/Telemetry/AbstractWorkspaceTelemetryService.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/Core/Def/Telemetry/VisualStudioWorkspaceTelemetryService.cs
Outdated
Show resolved
Hide resolved
Note: if WaitUntilFullyLoadedAsync doesn't work, then the following don't work:
And likely much more. If this is not something we can depend on, then we have to fix that now. But having some new thing take a dependency on it doesn't substantively change things. |
src/VisualStudio/Core/Def/Telemetry/VisualStudioWorkspaceTelemetryService.cs
Outdated
Show resolved
Hide resolved
@jasonmalinowski @sharwell ptal. |
src/Workspaces/Remote/ServiceHub/Services/ProcessTelemetry/RemoteProcessTelemetryService.cs
Show resolved
Hide resolved
@CyrusNajmabadi It's one of those things that can get broken from time to time, my worry was whether we'd end up with a bunch more broken stuff in that case. And even if it completes "eventually" that can still be after some amount of loading time, when I'd expect other features that might depend on OOP to be usable (like classification). New approach looks good though! |
src/VisualStudio/Core/Def/Remote/VisualStudioRemoteHostClientProvider.cs
Outdated
Show resolved
Hide resolved
@@ -133,9 +135,16 @@ private VisualStudioRemoteHostClientProvider( | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(leaving comment here because I can't do it elsewhere)
I like the "wait until launched" mechanism you're adding for uses like the SolutionChecksumUpdater, since it means that as a generic unrelated piece of code can wait. What I don't get though is why we're not just passing the telemetry settings here when we're creating the process, rather than assuming that other thing is going to run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I don't get though is why we're not just passing the telemetry settings here when we're creating the process
i guess i don't understand. how would we get those telemetry settings? it seems like we need to be told about them. which is when we go and pusha ll fo this to the OOP side.
…rovider.cs Co-authored-by: Jason Malinowski <jason@jason-m.com>
src/Workspaces/Remote/ServiceHub/Services/ProcessTelemetry/RemoteProcessTelemetryService.cs
Show resolved
Hide resolved
…oteProcessTelemetryService.cs
No description provided.